﻿<Unity:UnityConfigurationContainer x:Class="Common.Unity.Testing.Configuration"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Configuration="clr-namespace:Common.Core.Configuration;assembly=Common.Core"
	xmlns:Unity="clr-namespace:Common.Unity.Configuration;assembly=Common.Unity"
	xmlns:Objects="clr-namespace:Common.Unity.Testing.Objects"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:Testing="clr-namespace:Common.Unity.Testing"
	xmlns:CommonUnity="clr-namespace:Common.Unity;assembly=Common.Unity"
	x:TypeArguments="Testing:Configuration"
	>
	<System:Int32 x:Key="Pimpin">6776</System:Int32>
	<Unity:UnityContainer x:Key="DefaultContainer">
		<!-- Basic NamedTypeObject: -->
		<Unity:UnityType Type="{x:Type Objects:INamedObject}" MapTo="{x:Type Objects:NamedObject}">
			<Unity:InjectionProperty PropertyName="Name" Parameter="Mapped Named Object" />
		</Unity:UnityType>

		<!-- NamedTypeObject with String Type: -->
		<Unity:UnityType BuildName="Default" Type="{x:Type Objects:INamedTypeObject}" MapTo="{x:Type Objects:NamedTypeObject}">
			<Unity:InjectionProperty PropertyName="Name" Parameter="Mapped Named-Type Object" />
			<Unity:InjectionProperty PropertyName="Type">
				<Unity:InstanceValue Instance="{x:Type System:String}" />
			</Unity:InjectionProperty>
		</Unity:UnityType>

		<!-- NamedTypeObject with Int32 Type: -->
		<Unity:UnityType BuildName="Normal" Type="{x:Type Objects:INamedTypeObject}" MapTo="{x:Type Objects:NamedTypeObject}">
			<Unity:InjectionProperty PropertyName="Name" Parameter="Named-Type Object" />
			<Unity:InjectionProperty PropertyName="Type">
				<Unity:InstanceValue Instance="{x:Type System:Int32}" />
			</Unity:InjectionProperty>
		</Unity:UnityType>

		<!-- GenericObject with INamedTypeObject Type: -->
		<Unity:UnityType Type="{Configuration:GenericType 'Objects:GenericObject Objects:INamedTypeObject'}">
			<Unity:InjectionProperty PropertyName="Property">
				<Unity:DependencyValue Type="{x:Type Objects:INamedTypeObject}" BuildName="Normal" />
			</Unity:InjectionProperty>
		</Unity:UnityType>

		<Unity:UnityType Type="{x:Type Objects:ConstructorObject}">
			<Unity:InjectionConstructor>
				<Unity:InstanceValue Instance="String-based Construction!" />
			</Unity:InjectionConstructor>
		</Unity:UnityType>

		<Unity:UnityType Type="{x:Type Objects:ConstructorObject}" BuildName="Int">
			<Unity:InjectionConstructor>
				<Unity:InstanceValue Instance="{StaticResource Pimpin}" />
			</Unity:InjectionConstructor>
		</Unity:UnityType>

		<Unity:UnityType Type="{x:Type Objects:MethodObject}">
			<Unity:InjectionMethod MethodName="Method">
				<Unity:InstanceValue Instance="Hello Method Call!" />
			</Unity:InjectionMethod>
		</Unity:UnityType>
		<Unity:UnityContainer.Extensions>
			<CommonUnity:CommonExtension />
		</Unity:UnityContainer.Extensions>
	</Unity:UnityContainer>
</Unity:UnityConfigurationContainer>